<?php 
class indexClassAction extends Action
{
	
	public function defaultAction()
	{
		$this->assign('createcompany', m('company')->getCreate());
		
		$this->assign('joincompany', m('company')->getJoin($this->adminrs));
		
		$systemnum = m('option')->getval('systemnum');
		$this->assign('isinstall', isempt($systemnum) ? '1' : '2');
	}
	
	/**
	* 获取统计
	*/
	public function totalAction()
	{
		$day = $this->date;
		$jinri = m('party')->rows("`zxdt` like '".$day."%'");
		$files = m('file')->rows("`adddt` like '".$day."%'");
		$loginjl = m('logintoken')->rows("`moddt` like '".$day."%'");
		
		return array(
			'jinri' => $jinri,
			'files' => $files,
			'loginjl' => $loginjl,
		);
	}
	
	/**
	*	激活
	*/
	public function joinactiveAction()
	{
		$aid 	= (int)$this->get('aid');
		$mobile = $this->get('mobile');
		return m('usera')->joinActive($aid, $this->adminrs, $mobile);
	}
	
}